
import request from '@/utils/request'
// 查列表
export function fetchList(query) {
	return request({
		url: '/category/list',
		method: 'get',
		params: query
	})
}
// 查分页
export function getListPage(val) {
	return request({
		url: '/category/list?page=' + val,
		method: 'get',
		val
	})
}

// 查单个数据
export function getInfo(data){
	return request({
		url: '/category/getinfo',
		method: 'post',
		data
	})
}

// 添加
export function addCategory(data){
	return request({
		url: '/category/addCate',
		method: 'post',
		data
	})
}

// 修改
export function updateCategory(data){
	return request({
		url: '/category/updateCate',
		method: 'post',
		data
	})
}

// 删除
export function deleteCategory(data){
	return request({
		url: '/category/deleteCate',
		method: 'post',
		data
	})
}


